<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录</title>
	<link type="text/css" rel="stylesheet" th:href="@{/css/bootstrap-3.3.7-dist/css/style2.css}" />
	<link type="text/css" rel="stylesheet" th:href="@{/css/bootstrap-3.3.7-dist/css/public.css}" />

</head>
<body style="background: #f0f0f0">
<div class="right">
	<div class="location">
		<strong>你现在所在的位置是:</strong>
		<span>用户管理页面 >> 用户修改页面</span>
	</div>
	<div class="providerAdd">
		<form id="userForm" name="userForm" method="post" th:action="@{/user/modifyUser}">
			<input type="hidden" name="usercode" th:value="${session.user.usercode }">
			<input type="hidden" name="id" th:value="${session.user.id }"/>
			<input type="hidden" name="userpassword" th:value="${session.user.userpassword }"/>
			<div>
				<label for="username">用户名称：</label>
				<input type="text" name="username" id="userName" th:value="${session.user.username }">
				<font color="red"></font>
			</div>
			<div>
				<label >用户性别：</label>
				<select name="gender" id="gender">
					<option value="1" th:if="${session.user.gender} eq 1" th:with="sex='男'" th:text="${sex}"></option>
					<option value="2" th:if="${session.user.gender} eq 2" th:with="sex='女'" th:text="${sex}"></option>
					<option value="1" th:if="${session.user.gender} ne 1" th:with="sex='男'" th:text="${sex}"></option>
					<option value="2" th:if="${session.user.gender} ne 2" th:with="sex='女'" th:text="${sex}"></option>
				</select>
			</div>
			<div>
				<label for="data">出生日期：</label>
				<input type="text" Class="Wdate" id="birthday" name="birthday" th:value="${session.user.birthday }">

			</div>

			<div>
				<label for="userphone">用户电话：</label>
				<input type="text" name="phone" id="phone" th:value="${session.user.phone }">
				<font color="red"></font>
			</div>
			<div>
				<label for="userAddress">用户地址：</label>
				<input type="text" name="address" id="address" th:value="${session.user.address }">
			</div>
			<div>
				<label >用户角色：</label>
				<!-- 列出所有的角色分类 -->
				<input type="hidden" th:value="${session.user.userrole }" id="rid" />
				<select name="userrole" id="userRole" >
					<option value="1" th:if="${session.user.userrole}==1" >管理员</option>
					<option value="2" th:if="${session.user.userrole}==2" >经理</option>
					<option value="3" th:if="${session.user.userrole}==3" >普通员工</option>
					<option value="1" th:if="${session.user.userrole}!=1" >管理员</option>
					<option value="2" th:if="${session.user.userrole}!=2" >经理</option>
					<option value="3" th:if="${session.user.userrole}!=3" >普通员工</option>

				</select>
				<font color="red"></font>
			</div>
			<div class="providerAddBtn">
				<button  name="baocun" value="" style="height: 30px;width: 80px;background: #f0f0f0">保存</button>
			</div>
		</form>
		<form th:action="@{/user/userlist}">
			<button id="back" name="back" value="" style="margin-left: 245px;height: 30px;width: 80px;background: #f0f0f0">返回</button>
		</form>
	</div>
</div>


</body>
</html>